Deuteronomy 18:18-22

18:18 I will raise up a prophet like you for them from among their fellow Israelites. I will put my words in his mouth and he will speak to them whatever I command. 18:19 I will personally hold responsible anyone who then pays no attention to the words that prophet speaks in my name.

18:20 “But if any prophet presumes to speak anything in my name that I have not authorized him to speak, or speaks in the name of other gods, that prophet must die. 18:21 Now if you say to yourselves, ‘How can we tell that a message is not from the Lord?’18:22 whenever a prophet speaks in my name and the prediction is not fulfilled, then I have not spoken it; the prophet has presumed to speak it, so you need not fear him.”